/**
 * @author: Miss.杨
 * @date: 2025年3月15日 17:13:17
 * @description: 
 */
package com.sheepone.monitor.test;

import com.sheepone.monitor.audit.AuditMonitorSeverChannelInitializer;
import com.sheepone.monitor.server.AbstractMonitorServer;
import com.sheepone.monitor.server.config.MonitorServerConfig;
import com.sheepone.webdev.config.WebdevConfigManager;
import com.sheepone.webdev.log.WebDevLogger;

/**
 * @author: Miss.杨
 * @date: 2025年3月15日 17:13:17
 * @description:
 */
public class Server extends AbstractMonitorServer<MonitorServerConfig, AuditMonitorSeverChannelInitializer> {

    public Server() {
        super(configParse());
    }

    private static WebDevLogger logger = WebDevLogger.getLogger(Server.class);

    protected static MonitorServerConfig configParse() {
        WebdevConfigManager.init();
        MonitorServerConfig config = null;
        if (WebdevConfigManager.get("monitor.server") == null) {
            logger.info("No configuration found for monitor.server; default settings will be applied.");
            config = new MonitorServerConfig();
        } else {
            config = WebdevConfigManager.fill(MonitorServerConfig.class);
        }
        return config;
    }

    @Override
    protected AuditMonitorSeverChannelInitializer channelInitializer() {
        return new AuditMonitorSeverChannelInitializer();
    }

    @Override
    protected void afterInitd() {
    }

}
